package com.dragon.logical.service.contract;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dragon.repository.entity.AddPageData;
import com.dragon.repository.entity.Produce;
import com.dragon.repository.entity.Rejected;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.repository.entity.RejectedProduct;

import java.util.List;

/**
 * <p>
 * 退货表 服务类
 * </p>
 *
 * @author sy
 * @since 2023-12-05
 */
public interface IRejectedService extends IService<Rejected> {

    /**
     * 分页列表
     * @param page
     * @param limit
     * @return
     */
    Page<Rejected> rejectedList(String name,Integer status,Integer page, Integer limit);

    /**
     * 退货详情
     * @param id
     * @return
     */
    Rejected selectDetailById(Integer id);

    /**
     * 退货操作
     * @param rejected
     */
    AddPageData rejectedOperate(Rejected rejected);

    /**
     * 修改
     * @param rejected
     */
    void rejectedUpdate(Rejected rejected);

    /**
     * 取消退货
     * @param id
     */
    void rejectedDelete(Integer id);


    Page<Produce> isDeliverProduce(String search, Integer page, Integer limit);

    /**
     * 获取退货产品详情
     * @param rejectedId
     * @return
     */
    List<RejectedProduct> getRpList(Integer rejectedId);
}
